package org.gdpu.model;


/**
 * 考试状态
 */
public enum ExaminationState {
    /**
     * 尚未开始
     */
    PREPARE {
        public int getExaminationState() {
            return 0;
        }

    },
    /**
     * 考试进行中
     */
    PROCESS {
        public int getExaminationState() {
            return 1;
        }
    },
    /**
     * 考试结束
     */
    END {
        public int getExaminationState() {
            return 2;
        }
    },
    /**
     * 改卷中
     */
    CHECKING {
        public int getExaminationState() {
            return 3;
        }
    },
    /**
     * 考试作废
     */
    CANCEL {
        public int getExaminationState() {
            return 4;
        }
    },
    /**
     * 考试完成
     */
    COMPLETE {
        public int getExaminationState() {
            return 5;
        }
    };

    public abstract int getExaminationState();

    @Override
    public String toString() {
        switch (this) {
            case PREPARE:
            return "等待考试开始";
            case PROCESS:
                return "考试进行中";
            case END:
                return "考试结束";
            case CHECKING:
                return "教师改卷中";
            case CANCEL:
                return "考试取消";
            case COMPLETE:
                return "考试工作完成";
            default:
                return "Error";
        }
    }
}
